
const dataValid = (measure) => {
  return measure && measure.bodyfat > 5 && measure.bodyfat < 75;
};

const fillFlag = data => {
  let flagData = {
    bmr_flag: 1,
    water_flag: 1,
    protein_flag: 1,
    bodyage_flag: 1,
    body_shape_flag: 1,
    bone_flag: 1,
    muscle_flag: 1,
    subfat_flag: 1,
    fat_free_weight_flag: 1,
    visfat_flag: 1,
    sinew_flag: 1,
  }
  for(let i in flagData) {
    data[i] = flagData[i]
  }

  return data
};

module.exports = {
  dataValid,
  fillFlag
};



// WEBPACK FOOTER //
// ./src/utils/util.js
